<!DOCTYPE html>
<html>
<head>
<title>动态管理</title>
<#include "/header.html">
</head>
<body>
<div id="witapp" v-cloak>
	<div v-show="showList">
		<div class="grid-btn">
			<div class="form-group col-sm-2">
				<input type="text" class="form-control" v-model="q.key" @keyup.enter="query" placeholder="关键字查询">
			</div>
			<a class="btn btn-default" @click="query">查询</a>
			<#if shiro.hasPermission("dynamic:save")>
            <a class="btn btn-success" @click="add"><i class="fa fa-plus"></i>&nbsp;新增</a>
			</#if>
			<#if shiro.hasPermission("dynamic:update")>
            <a class="btn btn-success" @click="update"><i class="fa fa-eye"></i>&nbsp;查看</a>
			</#if>
			<#if shiro.hasPermission("dynamic:delete")>
            <a class="btn btn-success" @click="del"><i class="fa fa-trash-o"></i>&nbsp;删除</a>
			</#if>
		</div>
	    <table id="jqGrid"></table>
	    <div id="jqGridPager"></div>
    </div>
    
    <div v-show="!showList" class="panel panel-default">
		<div class="panel-heading">{{title}}</div>
		<form class="form-horizontal">
			<div class="form-group">
			   	<div class="col-sm-2 control-label">经营主体名称</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="dynamic.subjectName" placeholder="经营主体名称"/>
			    </div>
			</div>
			<div class="form-group">
			   	<div class="col-sm-2 control-label">动态名称</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" v-model="dynamic.name" placeholder="动态名称"/>
			    </div>
			</div>
			<div class="form-group">
			   	<div class="col-sm-2 control-label">基地名称</div>
			   	<div class="col-sm-10">
			      <input type="text" class="form-control" disabled="disabled" v-model="dynamic.farmName" placeholder="基地名称"/>
			    </div>
			</div>
			<div class="form-group">
			   	<div class="col-sm-2 control-label">农事类型</div>
			    <label class="radio-inline">
					<input type="radio" name="farmType" value="0" v-model="dynamic.farmType"/> 生长动态
				</label>
				<label class="radio-inline">
					<input type="radio" name="farmType" value="1" v-model="dynamic.farmType"/> 
					农事动态
				</label>
			</div>
			<div class="form-group">
			   	<div class="col-sm-2 control-label">动态图片</div>
			   	<div class="col-sm-10 graphics">
			   		
			    </div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label">状态</div>
				<label class="radio-inline">
					<input type="radio" name="status" value="0" v-model="dynamic.status"/> 禁用
				</label>
				<label class="radio-inline">
					<input type="radio" name="status" value="1" v-model="dynamic.status"/> 正常
				</label>
			</div>
			<div class="form-group">
			   	<div class="col-sm-2 control-label">描述</div>
			   	<div class="col-sm-10">
				    <textarea rows="8" class="form-control" v-model="dynamic.description" placeholder="描述信息"></textarea>
			    </div>
			</div>
			<div class="form-group">
				<div class="col-sm-2 control-label"></div> 
				<input type="button" class="btn btn-warning" @click="reload" value="返回"/>
			</div>
		</form>
	</div>
</div>

<script src="${request.contextPath}/statics/js/modules/wit/dynamic.js?_${.now?long}"></script>
</body>
</html>